3.10.81 \(\int \frac {(a c-b c x)^2}{a+b x} \, dx\)

Optimal. Leaf size=43 \[ \frac {4 a^2 c^2 \log (a+b x)}{b}+\frac {c^2 (a-b x)^2}{2 b}-2 a c^2 x \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {43} \begin {gather*} \frac {4 a^2 c^2 \log (a+b x)}{b}+\frac {c^2 (a-b x)^2}{2 b}-2 a c^2 x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a*c - b*c*x)^2/(a + b*x),x]

[Out]

-2*a*c^2*x + (c^2*(a - b*x)^2)/(2*b) + (4*a^2*c^2*Log[a + b*x])/b

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin {align*} \int \frac {(a c-b c x)^2}{a+b x} \, dx &=\int \left (-2 a c^2+\frac {4 a^2 c^2}{a+b x}-c (a c-b c x)\right ) \, dx\\ &=-2 a c^2 x+\frac {c^2 (a-b x)^2}{2 b}+\frac {4 a^2 c^2 \log (a+b x)}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 31, normalized size = 0.72 \begin {gather*} c^2 \left (\frac {4 a^2 \log (a+b x)}{b}-3 a x+\frac {b x^2}{2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a*c - b*c*x)^2/(a + b*x),x]

[Out]

c^2*(-3*a*x + (b*x^2)/2 + (4*a^2*Log[a + b*x])/b)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(a c-b c x)^2}{a+b x} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(a*c - b*c*x)^2/(a + b*x),x]

[Out]

IntegrateAlgebraic[(a*c - b*c*x)^2/(a + b*x), x]

________________________________________________________________________________________

fricas [A]  time = 1.23, size = 38, normalized size = 0.88 \begin {gather*} \frac {b^{2} c^{2} x^{2} - 6 \, a b c^{2} x + 8 \, a^{2} c^{2} \log \left (b x + a\right )}{2 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-b*c*x+a*c)^2/(b*x+a),x, algorithm="fricas")

[Out]

1/2*(b^2*c^2*x^2 - 6*a*b*c^2*x + 8*a^2*c^2*log(b*x + a))/b

________________________________________________________________________________________

giac [A]  time = 0.87, size = 45, normalized size = 1.05 \begin {gather*} \frac {4 \, a^{2} c^{2} \log \left ({\left | b x + a \right |}\right )}{b} + \frac {b^{3} c^{2} x^{2} - 6 \, a b^{2} c^{2} x}{2 \, b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-b*c*x+a*c)^2/(b*x+a),x, algorithm="giac")

[Out]

4*a^2*c^2*log(abs(b*x + a))/b + 1/2*(b^3*c^2*x^2 - 6*a*b^2*c^2*x)/b^2

________________________________________________________________________________________

maple [A]  time = 0.00, size = 35, normalized size = 0.81 \begin {gather*} \frac {b \,c^{2} x^{2}}{2}+\frac {4 a^{2} c^{2} \ln \left (b x +a \right )}{b}-3 a \,c^{2} x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-b*c*x+a*c)^2/(b*x+a),x)

[Out]

1/2*c^2*x^2*b-3*a*c^2*x+4*a^2*c^2*ln(b*x+a)/b

________________________________________________________________________________________

maxima [A]  time = 1.34, size = 34, normalized size = 0.79 \begin {gather*} \frac {1}{2} \, b c^{2} x^{2} - 3 \, a c^{2} x + \frac {4 \, a^{2} c^{2} \log \left (b x + a\right )}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-b*c*x+a*c)^2/(b*x+a),x, algorithm="maxima")

[Out]

1/2*b*c^2*x^2 - 3*a*c^2*x + 4*a^2*c^2*log(b*x + a)/b

________________________________________________________________________________________

mupad [B]  time = 0.15, size = 32, normalized size = 0.74 \begin {gather*} \frac {c^2\,\left (8\,a^2\,\ln \left (a+b\,x\right )+b^2\,x^2-6\,a\,b\,x\right )}{2\,b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*c - b*c*x)^2/(a + b*x),x)

[Out]

(c^2*(8*a^2*log(a + b*x) + b^2*x^2 - 6*a*b*x))/(2*b)

________________________________________________________________________________________

sympy [A]  time = 0.15, size = 34, normalized size = 0.79 \begin {gather*} \frac {4 a^{2} c^{2} \log {\left (a + b x \right )}}{b} - 3 a c^{2} x + \frac {b c^{2} x^{2}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-b*c*x+a*c)**2/(b*x+a),x)

[Out]

4*a**2*c**2*log(a + b*x)/b - 3*a*c**2*x + b*c**2*x**2/2

________________________________________________________________________________________